package com.hex.ds.hdtp.core.inf.metadata.service.impl;

import com.hex.ds.hdtp.core.inf.metadata.service.ISourceMethodHandlerContext;
import com.hex.ds.hdtp.core.inf.metadata.service.ISourceMethodService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

import java.util.Map;

@Slf4j
@Service
@RequiredArgsConstructor(onConstructor_ = {@Lazy, @Autowired})
public class SourceMethodHandlerContext implements ISourceMethodHandlerContext {

    private final Map<String, ISourceMethodService> sourceMethodServiceMap;

    @Override
    public ISourceMethodService getSourceMethodService(String sourceType) {
        return sourceMethodServiceMap.get(sourceType);
    }


}
